const { Schema, model } = require('mongoose')

const insuresSchema = new Schema({
    //产品名称
    name: String,
    //产品描述
    brief: {
        type: String,
        default: '27项出境保障多语言国际救援',
    },
    //产品封面
    coverMap: {
        type: String,
        default: 'index_ly04.jpg',
    },
    //产品详情
    coverDetails: {
        type: String,
        default: 'particulars.jpg',
    },
    //缴费类型
    payType: String,
    //保单形式
    policy: Array,
    //价格
    price: String,
    //是否可删除
    isDel: {
        type: Boolean,
        default: false
    },
    //是否可续保
    renew: {
        type: Boolean,
        default: false
    },
    //适用人群
    suitableFor: String,
    //所属分类
    typesId: {
        type: Schema.Types.ObjectId,
        ref: 'typesModel'
    },
}, { versionKey: false });
module.exports.insuresModel = model('insuresModel', insuresSchema, 'insures');